package org.kangjia.extend.dynamicFields;

import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.List;

/**
 * 白名单集合
 * @author ren
 * @description
 * @date 2022年07月03日 16:46:52
 */
public class WhiteList extends FieldList {

    public WhiteList(List<String> fieldNames) {
        super(fieldNames);
    }

    public WhiteList(String[] fieldNames) {
        super(fieldNames);
    }

    @Override
    boolean add(String fieldName) {
        return super.fieldNameList.add(fieldName);
    }

    @Override
    boolean addAll(List<String> fieldNames) {
        return super.fieldNameList.addAll(fieldNames);
    }

    @Override
    boolean addAll(String[] fieldNames) {
        return super.fieldNameList.addAll(Arrays.asList(fieldNames));
    }

    @Override
    boolean remove(String fieldName) {
        return super.fieldNameList.remove(fieldName);
    }

    @Override
    void clear() {
        super.fieldNameList.clear();
    }
}
